package com.youtills.core.config;

import java.util.Set;

/**
 * Created by IntelliJ IDEA.
 * User: ravi
 * Date: 9/5/12
 * Time: 7:17 PM
 * To change this template use File | Settings | File Templates.
 */
class SystemPropertyProvider implements IConfigProvider{

    public void init(String environment) {
        //To change body of implemented methods use File | Settings | File Templates.
    }

    public void refresh() {
        //To change body of implemented methods use File | Settings | File Templates.
    }

    public void addProperties(String source) {
        //To change body of implemented methods use File | Settings | File Templates.
    }

    public void addSource(String source, boolean reload) {
        //Do nothing...
    }

    public IConfigValue getConfigValue(String key) {
        String value = System.getProperty(key);
        if(value != null){
            return new ConfigValue(value, "System Property");
        }
        return null;  //To change body of implemented methods use File | Settings | File Templates.
    }

    public Set<String> getConfigNames() {
        return System.getProperties().stringPropertyNames();
    }
}
